
var t=document.querySelector("#totop");
window.onscroll=function(){
//    console.log(document.body.scrollTop>1000) 
    if(document.body.scrollTop>1000 || document.documentElement.scrollTop>1000){ 
        t.style.display="block";
    }else{
        t.style.display="none";
    }
}
t.addEventListener('click',function(){
    window.scrollTo({
        top:0,
        behavior:'smooth'
    })
//    window.scrollTo(0,0);
})
var box = document.querySelector(".box")
var fen = document.querySelector(".fen")
box.addEventListener('mouseover',function(){
    fen.style.display="block";
})
fen.addEventListener('mouseleave',function(){
    this.style.display="none";
})
//box.addEventListener('mouseleave',function(){
//    fen.style.display="none";
//})